﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;

namespace Web.Codes
{
    public class BasePage : System.Web.UI.Page
    {
        public BasePage()
        {
            base.Load += new EventHandler(OnLoad);
        }
        protected void OnLoad(object sender, EventArgs e)
        {            
            if (!HttpContext.Current.User.Identity.IsAuthenticated)
                FormsAuthentication.RedirectToLoginPage();
        }
    }
}